var gulp = require('gulp');
var sass = require('gulp-sass');
var babel = require('gulp-babel');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var cleanCSS = require('gulp-clean-css');
var del = require('del');
 
var paths = {
    styles: {
        src: 'assets/scss/**/*.scss',
        dest: 'assets/css'
    }
};

function clean() {
    return del([ 'assets/css' ]);
}

function styles() {
    return gulp.src(paths.styles.src)
    .pipe(sass())
    .pipe(cleanCSS())
    .pipe(gulp.dest(paths.styles.dest));
}
 
 
function watch() {
    gulp.watch(paths.styles.src, styles);
}
 

var build = gulp.series(clean, gulp.parallel(styles));

exports.clean = clean;
exports.styles = styles;
exports.watch = watch;
exports.build = build;
exports.default = build;



//压缩之后的js可以使用该网站http://jshaman.com/protect.html对js进行安全加密操作(别人无法解密和破解你的js代码)



